﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace L03
{
    class Program
    {
        static void Main(string[] args)
        {
            double b = Math.Pow(10, -6);
            double sum = 1;
            double c = -1;
            double n = 3;
            while (1 / n >= b)
            {
                sum = sum + c / n;
                n = n + 2;
                c = -c;
            }
            Console.WriteLine(4 * sum);
            Console.ReadKey();
        }
    }
}


